package com.wenson.behavior.visitor;

import java.time.LocalDate;

/**
 * @ClassName: Candy
 * @Author: luowangcheng
 * @Date: 2024/6/16 15:35
 * @Description:
 */
public class Candy extends Product implements Acceptable {
    public Candy(String name, LocalDate produceDate, float price) {
        super(name, produceDate, price);
    }

    @Override
    public void accept(Visitor visitor) {
        visitor.visit(this);//把自己交给访问者
    }
}
